import "./index.scss";
export default defineComponent({
	props: [],
	emits: [],
	setup() {
		const deviceTotal: any = inject("deviceTotal");
		return () => {
			return (
				<div class="total flex justify-between">
					<div class="data-item flex items-center">
						<div class="icon icon-1"></div>
						<div class="data-info">
							<div class="data-title">电源负荷</div>
							<div class="data-value">
								<span class="value">569</span>
								<span class="unit">GW</span>
							</div>
						</div>
					</div>

					<div class="flex">
						<div class="data-item flex items-center pr-10">
							<div class="icon icon-2"></div>
							<div class="data-info">
								<div class="data-title">在线设备</div>
								<div class="data-value">
									<span class="value">{deviceTotal.online}</span>
									<span class="unit">个</span>
								</div>
							</div>
						</div>

						<div class="data-item flex items-center">
							<div class="data-info">
								<div class="data-title">离线设备</div>
								<div class="data-value">
									<span class="value">{deviceTotal.offline}</span>
									<span class="unit">个</span>
								</div>
							</div>
						</div>
					</div>
				</div>
			);
		};
	}
});
